@isTest (SeeAllData=true)
private class Announcement_Update_Status_TestClass {   
 // Methods for testing 
static testMethod void testMycontroller()
  {

      
      Announcement__c Ann_c = new Announcement__c();
      Ann_c.Name = 'ABC';
      insert Ann_c;
      
      A_Task__c AnnTask_c = new A_Task__c();
      AnnTask_c.Name ='ABC';
      AnnTask_c.Announcement__c = Ann_c.Id;
      AnnTask_c.Status__c='Not Started';
      insert AnnTask_c;
      
      Account Acount = new Account(name='ABC');
      insert Acount;
      
      Contact contact1 = new Contact();
      contact1.LastName = 'lastname1';
      contact1.Firstname = 'firstname1';
      contact1.email = 'elias.almanza@softtek.com';
      contact1.AccountId= Acount.Id;
      insert contact1;
      
      Profile p = [SELECT Id FROM Profile WHERE Name='Custom - Portal Employee']; 
      User Usr = new User(Alias = 'empltest', Email='elias.almanza@softtek.com', 
      EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US', 
      LocaleSidKey='en_US', ProfileId = p.Id,  CurrencyIsoCode='USD', 
      TimeZoneSidKey='America/Los_Angeles', UserName='employeetest@softtek.com', ContactId=contact1.Id);
//      Usr.ContactId = contact1; 
      insert Usr;
      
      A_Task_User__c AnnTskUsr_c = new A_Task_User__c();
      AnnTskUsr_c.Announcement_Task__c = AnnTask_c.Id;
      AnnTskUsr_c.User__c = Usr.Id;
      insert AnnTskUsr_c;
      
      List<Announcement__c> list_a_c = [SELECT Id FROM Announcement__c WHERE Name='ABC' LIMIT 1];
     
      String id_a_c = list_a_c[0].Id;


       //Use the PageReference Apex class to instantiate a page
       PageReference pageRef = new PageReference('/apex/Ann_Task_My_List');
       Test.setCurrentPage(pageRef);
       System.currentPageReference().getParameters().put('paramAnn_Id', Ann_c.Id); 
   
       //Instantiate and construct the controller class.   
       Announcement_Update_Status controller = new Announcement_Update_Status();

     
      
       //Example of calling the 'setter' method for several properties. 
       //Normally these setter methods are initiated by a user interacting with the Visualforce page, 
       //but in a test method, just call the setter method directly. 
       controller.verifyParameters();
       
       
       
       AnnTask_c.Status__c='In Progress';
       Update AnnTask_c;
       controller.verifyParameters();
       
       AnnTask_c.Status__c='Completed';
       Update AnnTask_c;
       controller.verifyParameters();

       //Verify that the success page displays
      // System.assertEquals('/apex/Ann_Task_List', nextPage);

      
  }
}